package com.zsc.spring.study.componentScan;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;

@Configuration
/**
 * @ComponentScan 指定要扫描的包
 * excludeFilters=Filter[],指定扫描时排除的组件
 *includeFilters=Filter[],指定需要包括的组件
 *FilterType.ANNOTATION  安照注解
 *FilterType.ASSIGNABLE_TYPE 按照给定类型
 *FilterType.ASPECTJ  使用表达式过滤
 *FilterType.REGEX    使用正则
 *FilterType.CUSTOM   使用自定义
 */
@ComponentScan(value={"com.rn"},excludeFilters={
//		@Filter(type=FilterType.ANNOTATION,classes={Controller.class,Service.class}),
//		@Filter(type=FilterType.ASSIGNABLE_TYPE,classes={BookDao.class})
		@Filter(type= FilterType.CUSTOM,classes={MyTypeFilter.class})
},includeFilters={
//		@Filter(type=FilterType.ANNOTATION,classes={Repository.class})
		
		
})
public class MainConfig {

}
